<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Close shared memory block</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="ref.shmop.html">« Shared Memory 函数</a></li>
      <li style="float: right;"><a href="function.shmop-delete.html">shmop_delete »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="ref.shmop.html">Shared Memory 函数</a></li>
    <li>Close shared memory block</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="function.shmop-close" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">shmop_close</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">shmop_close</span> &mdash; <span class="dc-title">Close shared memory block</span></p>

 </div>

 <div id="function.shmop-close-refsynopsisdiv">
  <div class="warning"><strong class="warning">警告</strong><p class="simpara">本函数已自 PHP 8.0.0
 起被<em class="emphasis">废弃</em>。强烈建议不要依赖本函数。</p></div>
 </div>

 <div class="refsect1 description" id="refsect1-function.shmop-close-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>shmop_close</strong></span>(<span class="methodparam"><span class="type"><a href="class.shmop.html" class="type Shmop">Shmop</a></span> <code class="parameter">$shmop</code></span>): <span class="type"><span class="type void">void</span></span></div>

  <blockquote class="note"><p><strong class="note">注意</strong>: 
 <p class="para">
  此函数无效。在 PHP 8.0.0 之前，用于关闭资源。
 </p>
</p></blockquote>

  <p class="para">
   <span class="function"><strong>shmop_close()</strong></span> is used to close a shared memory block.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.shmop-close-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt>
<code class="parameter">shmop</code></dt>

     <dd>

      <p class="para">
       The shared memory block resource created by 
       <span class="function"><a href="function.shmop-open.html" class="function">shmop_open()</a></span>
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.shmop-close-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   没有返回值。
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.shmop-close-changelog">
  <h3 class="title">更新日志</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>版本</th>
      <th>说明</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.0.0</td>
      <td>
       <code class="parameter">shmop</code> expects a <span class="classname"><a href="class.shmop.html" class="classname">Shmop</a></span>
       instance now; previously, a <span class="type">resource</span> was expected.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 examples" id="refsect1-function.shmop-close-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-3350">
    <p><strong>示例 #1 Closing shared memory block</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />shmop_close</span><span style="color: #007700">(</span><span style="color: #0000BB">$shm_id</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
  <p class="para">
   This example will close shared memory block identified by <code class="literal">$shm_id</code>.
  </p>
 </div>

 <div class="refsect1 seealso" id="refsect1-function.shmop-close-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.shmop-open.html" class="function" rel="rdfs-seeAlso">shmop_open()</a> - Create or open shared memory block</span></li>
   </ul>
  </p>
 </div>

</div></div></div></body></html>